﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using mveEngine;

namespace MetaVideoEditorEvolved.Converter
{
    public class TranslationConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string translation = Kernel.Instance.GetString(value.ToString());

            if (string.IsNullOrEmpty(translation))
            {
                return value.ToString() + " [Translation's missing]";
            }
            else
            {
                return translation;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
